﻿
/* 
 * Since 2008 - 2013
 */
package com.hh.bss.oa.entity;

import javax.validation.constraints.*;
import org.hibernate.validator.constraints.*;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import java.util.*;

import com.hh.bss.base.*;
import com.hh.bss.common.page.*;
import com.hh.bss.common.page.impl.*;
import com.hh.bss.oa.dao.*;
import com.hh.bss.oa.entity.*;
import com.hh.bss.oa.service.*;
import com.hh.bss.oa.vo.query.*;
import com.hh.bss.util.*;





public class OaMeetingRoomLog extends BaseEntity implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "OaMeetingRoomLog";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_ROOM_ID = "roomId";
	public static final String ALIAS_TASK_ID = "taskId";
	public static final String ALIAS_MEETING_DATE = "meetingDate";
	public static final String ALIAS_BEGIN_DT = "beginDt";
	public static final String ALIAS_END_DT = "endDt";
	public static final String ALIAS_STATUS = "status";
	public static final String ALIAS_CREATE_DT = "createDt";
	
	//date formats
	public static final String FORMAT_BEGIN_DT = DATE_FORMAT;
	public static final String FORMAT_END_DT = DATE_FORMAT;
	public static final String FORMAT_CREATE_DT = DATE_FORMAT;
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Integer id;
	
	private java.lang.Integer roomId;
	
	private java.lang.Integer taskId;
	@Length(max=10)
	private Date meetingDate;
	
	private java.util.Date beginDt;
	
	private java.util.Date endDt;
    private java.lang.String title;
	public java.lang.String getTitle() {
		return title;
	}

	public void setTitle(java.lang.String title) {
		this.title = title;
	}

	public java.lang.Integer getUseType() {
		return useType;
	}

	public void setUseType(java.lang.Integer useType) {
		this.useType = useType;
	}

	public java.lang.String getOrderAccount() {
		return orderAccount;
	}

	public void setOrderAccount(java.lang.String orderAccount) {
		this.orderAccount = orderAccount;
	}

	public java.lang.String getPerson() {
		return person;
	}

	public void setPerson(java.lang.String person) {
		this.person = person;
	}

	private java.lang.Integer useType;
	private java.lang.String orderAccount;
	@Length(max=255)	
	private java.lang.String person;
	private java.lang.String status;
	
	private java.util.Date createDt;
	//columns END

	public OaMeetingRoomLog(){
	}

	public OaMeetingRoomLog(
		java.lang.Integer id
	){
		this.id = id;
	}

	public void setId(java.lang.Integer value) {
		this.id = value;
	}
	
	public java.lang.Integer getId() {
		return this.id;
	}
	public void setRoomId(java.lang.Integer value) {
		this.roomId = value;
	}
	
	public java.lang.Integer getRoomId() {
		return this.roomId;
	}
	public void setTaskId(java.lang.Integer value) {
		this.taskId = value;
	}
	
	public java.lang.Integer getTaskId() {
		return this.taskId;
	}
	public void setMeetingDate(Date value) {
		this.meetingDate = value;
	}
	
	public Date getMeetingDate() {
		return this.meetingDate;
	}
	public String getBeginDtString() {
		return DateConvertUtils.format(getBeginDt(), FORMAT_BEGIN_DT);
	}
	public void setBeginDtString(String value) {
		setBeginDt(DateConvertUtils.parse(value, FORMAT_BEGIN_DT,java.util.Date.class));
	}
	
	public void setBeginDt(java.util.Date value) {
		this.beginDt = value;
	}
	
	public java.util.Date getBeginDt() {
		return this.beginDt;
	}
	public String getEndDtString() {
		return DateConvertUtils.format(getEndDt(), FORMAT_END_DT);
	}
	public void setEndDtString(String value) {
		setEndDt(DateConvertUtils.parse(value, FORMAT_END_DT,java.util.Date.class));
	}
	
	public void setEndDt(java.util.Date value) {
		this.endDt = value;
	}
	
	public java.util.Date getEndDt() {
		return this.endDt;
	}
	public void setStatus(java.lang.String value) {
		this.status = value;
	}
	
	public java.lang.String getStatus() {
		return this.status;
	}
	public String getCreateDtString() {
		return DateConvertUtils.format(getCreateDt(), FORMAT_CREATE_DT);
	}
	public void setCreateDtString(String value) {
		setCreateDt(DateConvertUtils.parse(value, FORMAT_CREATE_DT,java.util.Date.class));
	}
	
	public void setCreateDt(java.util.Date value) {
		this.createDt = value;
	}
	
	public java.util.Date getCreateDt() {
		return this.createDt;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("RoomId",getRoomId())
			.append("TaskId",getTaskId())
			.append("MeetingDate",getMeetingDate())
			.append("BeginDt",getBeginDt())
			.append("EndDt",getEndDt())
			.append("Status",getStatus())
			.append("CreateDt",getCreateDt())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof OaMeetingRoomLog == false) return false;
		if(this == obj) return true;
		OaMeetingRoomLog other = (OaMeetingRoomLog)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

